import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import router from './router'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import zhCn from "element-plus/es/locale/lang/zh-cn"//国际化
import Antd from 'ant-design-vue'
import { createPinia } from 'pinia'
import axios from 'axios'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate' //为了保持登陆状态所设置的
import "@/assets/iconfont.js"
const app = createApp(App);
// 实例化 Pinia
const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)

app.use(ElementPlus,{locale: zhCn}).use(Antd).use(router).use(pinia).mount('#app')
app.config.globalProperties.$axios = axios
//全局注册图标组件
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
